home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-0143 / articles / gfa.doc < prev    next >
Text File  |  1997-04-16  |  1KB  |  50 lines

  1.  
  2.  
  3.                      -----------------------
  4.                      GFA TUTORIAL - PART ONE
  5.                      -----------------------
  6.                                    Written by Rich Stockdale
  7.  
  8.  
  9. NOTE:The following document was submitted to ST Format as a short 
  10. article for 'Hints and Tips' but no reply was given at all.
  11.  
  12.  
  13. GFA Basic is an excellent programming language, but it does 
  14. have a few annoying bugs. One of it's most annoying errors is
  15. that for some reason setting up the colour palette using
  16. SETCOLOR is a complete disaster!!!
  17.  
  18. The listing below will reconfigure the order of the colour 
  19. palette so that it works just as well as the equivelent command
  20. in any other BASIC language. It also resets the colours for the
  21. editor,and redefines the boundries for the mouse pointer 
  22. (low rez only)... Notice what happens when you press
  23. Control+Shift+Alt if you've messed up the colour palette!!!
  24.  
  25.  
  26. NOTE: Place this at the start of your program,
  27.  
  28.  SETCOLOR Register%(<r%>),<red>,<green>,<blue>
  29.  SETCOLOR Register%(<r%>),n
  30.                    n=(red*256)+(green*16)+blue
  31.  
  32. DIM register%(15)
  33. DATA 0,2,3,6,4,7,5,8,9,10,11,14,12,15,13,1
  34. FOR r%=0 TO 15
  35.   READ register%(r%)
  36. NEXT r
  37. DPOKE (9958),319
  38. ON BREAK GOSUB end_prog
  39. GOTO start_of_program
  40. '
  41. PROCEDURE end_prog
  42.   DPOKE (9958),639
  43.   SETCOLOR 0,7,7,7
  44.   SETCOLOR 1,0
  45.   SETCOLOR 15,0
  46.   EDIT
  47. RETURN
  48. '
  49. start_of_program             Put your main program here
  50.